package MusicPathdeal;


import java.io.File;
import java.io.IOException;

import javax.swing.JOptionPane;
//创建music文件夹
public class CreateFile {
	public static void Creatfile() throws ClassNotFoundException, IOException {
		String Newfile = System.getProperty("user.dir");
		String musicfile1 = Newfile + "\\music";
		System.out.println(musicfile1);
		File filemusic = new File(musicfile1);
		if (!filemusic.exists()) { // 如果文件夹不存在
			filemusic.mkdir();// 创建music文件夹
		}		
		if(filemusic.exists()) {
			 MusicLeadin.readmusic();
			}else //文件夹创建失败
				JOptionPane.showMessageDialog(null, "音乐文件夹不存在!", "错误", JOptionPane.ERROR_MESSAGE);
	}
	  
}
